define(function(require,exports,module){
	var aw = require("ajaxwrapper");
	
	module.exports = {
		save: function(cParams,sCb){
			aw.saveOrUpdate("api/producttype/save",cParams,sCb);
		},
		query: function(cParams,sCb){
			aw.ajax({
				url: "api/producttype/query",
				data: cParams,
				success: sCb
			});

		},
		del: function(pk,sCb){
			aw.del("api/producttype/"+pk+"/delete",sCb);
		},
		search: function(cParams,sCb){
			aw.ajax({
				url: "api/producttype/search",
				data: cParams,
				success: sCb
			});
		},
		changeSeal: function(cParams,sCb){
			aw.ajax({
				url: "api/producttype/changeseal",
				data: cParams,
				success: sCb
			});
		},
		seekQuote: function(cParams,sCb){
			aw.ajax({
				url:"api/producttype/seekquote",
				data:cParams,
				success: sCb
//					function(flag){
//					if(flag == false){
//						var form = widget.get("form");
//						form.reset();
//						form.setData(data);
//						form.setValue("organization",data.organization.pkOrganization);
//						form.setValue("creator",data.creator.pkUser);
//						form.setValue("none",data.creator.name);
//						form.setDisabled("createDate",true);
//        				form.setDisabled("none",true);
//						
//						widget.hide([".J-grid"]).show([".J-form"]);
//						widget.get("subnav").hide(["search","add","filter"]).show(["return"]);
//					}else{
//						Dialog.alert({content:"数据已被引用,不可修改"});
//						return false;
//					}
//				}
			});
		}
	};
});